



local LORAMIA_COM_TENT_ENTER_ACTION = Action()
LORAMIA_COM_TENT_ENTER_ACTION.id = "LORAMIA_COM_TENT_ENTER_ACTION"
LORAMIA_COM_TENT_ENTER_ACTION.strfn = function(act)
    return "DEFAULT"
end

LORAMIA_COM_TENT_ENTER_ACTION.fn = function(act)
    local target = act.target
    local doer = act.doer
    if target and doer and target.components.loramia_com_tent then
        local replica_com = target.replica.loramia_com_tent or target.replica._.loramia_com_tent
        if replica_com and replica_com:Test(doer,true) then
            return target.components.loramia_com_tent:PlayerEnter(doer)
        end
    end
    return false
end
AddAction(LORAMIA_COM_TENT_ENTER_ACTION)

AddComponentAction("SCENE", "loramia_com_tent" , function(target, doer, actions, right_click)-------    建筑一类的特殊交互使用
    if doer and target then
            local loramia_com_tent = target.replica.loramia_com_tent or target.replica._.loramia_com_tent
            if loramia_com_tent and loramia_com_tent:Test(doer) then
                table.insert(actions, ACTIONS.LORAMIA_COM_TENT_ENTER_ACTION)
            end
    end
end)

local function handler_fn(player)
    return "give"
end

AddStategraphActionHandler("wilson",ActionHandler(LORAMIA_COM_TENT_ENTER_ACTION,function(player)
    return handler_fn(player)
end))
AddStategraphActionHandler("wilson_client",ActionHandler(LORAMIA_COM_TENT_ENTER_ACTION, function(player)    
    return handler_fn(player)
end))

STRINGS.ACTIONS.LORAMIA_COM_TENT_ENTER_ACTION = STRINGS.ACTIONS.LORAMIA_COM_TENT_ENTER_ACTION or {
    DEFAULT = STRINGS.ACTIONS.ENTER_GYM
}



